package zhh.tangbao.commodity.serivce;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import zhh.tangbao.commodity.constant.OrderStatus;
import zhh.tangbao.commodity.dto.CommodityOrderQueryDto;
import zhh.tangbao.commodity.entity.CommodityOrder;
import zhh.tangbao.commodity.entity.CommodityOrderContent;
import zhh.tangbao.commodity.vo.OrderInfoVo;
import zhh.tangbao.system.vo.SelectOptionsVo;

import java.util.Collection;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *     描述
 * </p>
 * @author 粥灰灰
 * <p>2023/3/4</p>
 */
public interface CommodityOrderService {

    OrderInfoVo get(String id);

    Page<CommodityOrder> page(CommodityOrderQueryDto dto);

    /**
     * 普通增加，给管理员手动添加订单用
     * @param order
     * @return
     */
    int add(CommodityOrder order);

    /**
     * 管理手动删除用的删除功能
     * @param id
     * @return
     */
    int delete(String id);

    /**
     * 管理手动更新订单信息的更新功能
     * @param order
     * @return
     */
    int update(CommodityOrder order);

    List<CommodityOrderContent> getContent(String orderId);


    List<SelectOptionsVo> currentAllOrderStatusOptions();

    List<SelectOptionsVo> allOrderStatusOptions();

    int batchDelete(List<String> ids);

    List<CommodityOrder> allOrderDuring(Date start, Date end, OrderStatus status);

    List<CommodityOrderContent> batchSelectContentByOrderIds(Collection<String> orderIds);
}
